package com.yang.webhook.modules.service.impl;
import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;

import com.yang.webhook.common.utils.CreateGUID;
import com.yang.webhook.modules.entity.WisLog;
import com.yang.webhook.modules.service.WisLogService;

/**
 * 权限业务接口实现
 * 
 * @author 刘超
 * @version 1.0 2017-07-19
 */
@Service("WisLogService")
public class WisLogServiceImpl extends CommonServiceImpl implements WisLogService {

	public List<Object> list() throws Exception {
		// TODO Auto-generated method stub
		return this.wisLogDao.query(new WisLog());
	}

	public List<Object> listByKey(String key) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean delete(String key) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean update(String key) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean save() {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see com.huiw.log.Model.service.WisLogService#recordinfLog(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
	 */
	public String recordinfLog(String logSysIdentify, String logSysPersonId, String logSysRecordingtime,
			String logSysOperationdesc, String logSysSystemdesc,String logSysurl) {
		// TODO Auto-generated method stub
	String message="记录失败";
		WisLog wisLog=new WisLog();
	wisLog.setLogId(CreateGUID.generateGUID());
	wisLog.setLogRecordingtime(new Date());
	wisLog.setLogSysIdentify(logSysIdentify);
	wisLog.setLogSysOperationdesc(logSysOperationdesc);
	wisLog.setLogSysPersonid(logSysPersonId);
	wisLog.setLogSysRecordingtime(logSysRecordingtime);
	wisLog.setLogSysSystemdesc(logSysSystemdesc);
	wisLog.setLogSysurl(logSysurl);
	if(this.wisLogDao.save(wisLog)){
		message="记录成功";
	}
		return message;
	}

	
}
